# -*- encoding: utf-8 -*-
"""

PyCharm 05grid函数的使用
2024年10月27日11时45分
by wenyang

文件主要内容:


"""
import numpy as np
import matplotlib.pyplot as plt


def main():
    Fs = 100
    x = np.arange(0, 10, 1 / Fs)
    y = np.sin(x)
    plt.xlim(1, 8)
    plt.ylim(-1, 1)
    plt.grid(linestyle = "--", color = "r")
    plt.plot(x, y, ls = "-", lw = 2, color = "b", label = "sin data")
    plt.legend()
    plt.xlabel("Time(s)")
    plt.ylabel('Amplitude')
    plt.show()


if __name__ == "__main__":
    main()
